package com.ashun.mapper;

import java.util.List;


import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;
import org.springframework.cache.annotation.CacheConfig;
import org.springframework.cache.annotation.CachePut;
import org.springframework.cache.annotation.Cacheable;
import org.springframework.data.web.config.EnableSpringDataWebSupport;

import com.ashun.entity.User;

/**
 * Created by xujiashuai on 2016/6/18.
 */
@CacheConfig(cacheNames = "users")
@Mapper
public interface UserMapper {

    @Select("select * from user where id = #{id}")
    public User selectById(@Param("id") int id);


    @Select("select * from user")
    public List<User> list();
}
